package com.yunhe.java.day10;

/**
 * Created by Administrator on 2017/8/3 0003.
 */
public class Practice1 {
    public static void main(String[] args) {
        try {
            Practice1.sanjiao(2,8,6);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void sanjiao(int a, int b, int c) throws MyException{
        if (a > b - c && a < b + c) {
            System.out.println(a);
            System.out.println(b);
            System.out.println(c);

        }else {
            throw new MyException("非法");
        }
    }
}